package com.example.service.util.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author juzipi
 * @Date 2021/7/20 14:25
 * @Info
 */
@Component
public class FilePropertiesVariable {


    public static String secretId;

    public static String secretKey;

    public static String bucket;//地域

    public static String bucketName;//存储桶

    public static String prefix;//图片前缀


    @Value(value = "${tc.cos.secretId}")
    public void setSecretId(String secretId){
        FilePropertiesVariable.secretId = secretId;
    }

    @Value(value = "${tc.cos.secretKey}")
    public void setSecretKey(String secretKey){
        FilePropertiesVariable.secretKey = secretKey;
    }

    @Value(value = "${tc.cos.bucket}")
    public void setBucket(String bucket){
        FilePropertiesVariable.bucket = bucket;
    }

    @Value(value = "${tc.cos.bucketName}")
    public void setBucketName(String bucketName){
        FilePropertiesVariable.bucketName = bucketName;
    }

    @Value(value = "${tc.cos.prefix}")
    public void setPrefix(String prefix){
        FilePropertiesVariable.prefix = prefix;
    }


}
